/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.aruoc.sim;

import org.aruoc.sim.SimWorldPainter;
import org.aruoc.sim.SimWorld;
import java.awt.Graphics2D;

/**
 *
 * @mperezma
 */
public abstract class Sim {
    private SimWorld world;
    
    public Sim() {        
    }
    
    public void setWorld(SimWorld world) {
        this.world = world;
        world.addSim(this);
    }
    
    public abstract void construct();
    
    public abstract void paint(SimWorldPainter p, Graphics2D g);
    
    public abstract void step();

    public SimWorld getWorld() {
        return world;
    }

}
